<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head profile="http://gmpg.org/xfn/11">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Deep Copy | 2,000 Things You Should Know About C#</title>
	<link rel="pingback" href="http://csharp.2000things.com/xmlrpc.php">
			<script src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/remote-login.php" type="text/javascript"></script>
		<script type="text/javascript">
		/* <![CDATA[ */
			if ( 'function' === typeof WPRemoteLogin ) {
				document.cookie = "wordpress_test_cookie=test; path=/";
				if ( document.cookie.match( /(;|^)\s*wordpress_test_cookie\=/ ) ) {
					WPRemoteLogin();
				}
			}
		/* ]]> */
		</script>
		<link rel="alternate" type="application/rss+xml" title="2,000 Things You Should Know About C# » Feed" href="http://csharp.2000things.com/feed/">
<link rel="alternate" type="application/rss+xml" title="2,000 Things You Should Know About C# » Comments Feed" href="http://csharp.2000things.com/comments/feed/">
<link rel="alternate" type="application/rss+xml" title="2,000 Things You Should Know About C# » Deep Copy Tag Feed" href="http://csharp.2000things.com/tag/deep-copy/feed/">
<script type="text/javascript">
/* <![CDATA[ */
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}
/* ]]> */
</script>
<link rel="stylesheet" id="all-css-0" href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/a_002.css" type="text/css" media="all">
<link rel="stylesheet" id="print-css-1" href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/global-print.css" type="text/css" media="print">
<link rel="stylesheet" id="all-css-2" href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/a.css" type="text/css" media="all">
<script type="text/javascript">
/* <![CDATA[ */
var LoggedOutFollow = {"invalid_email":"Your subscription did not succeed, please try again with a valid email address."};
/* ]]> */
</script>
<script type="text/javascript" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/a_003.js"></script><style type="text/css"></style>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://2000thingscsharp.wordpress.com/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://s1.wp.com/wp-includes/wlwmanifest.xml"> 
<meta name="generator" content="WordPress.com">
<link rel="shortcut icon" type="image/x-icon" href="http://s2.wp.com/i/favicon.ico?m=1405977958g" sizes="16x16 24x24 32x32 48x48">
<link rel="icon" type="image/x-icon" href="http://s2.wp.com/i/favicon.ico?m=1405977958g" sizes="16x16 24x24 32x32 48x48">
<link rel="apple-touch-icon-precomposed" href="http://s0.wp.com/i/webclip.png?m=1391188133g">
<link rel="openid.server" href="http://2000thingscsharp.wordpress.com/?openidserver=1">
<link rel="openid.delegate" href="http://2000thingscsharp.wordpress.com/">
<link rel="search" type="application/opensearchdescription+xml" href="http://csharp.2000things.com/osd.xml" title="2,000 Things You Should Know About C#">
<link rel="search" type="application/opensearchdescription+xml" href="https://wordpress.com/opensearch.xml" title="WordPress.com">

		<style>
			@media screen and (min-width: 783px) { 
				#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { 
					margin-top: 5px; 
				} 
			}
		</style>

		<meta name="application-name" content="2,000 Things You Should Know About C#"><meta name="msapplication-window" content="width=device-width;height=device-height"><meta name="msapplication-tooltip" content="Everything a C# Developer Needs to Know, in Bite-Sized Chunks"><meta name="msapplication-task" content="name=Subscribe;action-uri=http://csharp.2000things.com/feed/;icon-uri=http://s2.wp.com/i/favicon.ico"><meta name="msapplication-task" content="name=Sign up for a free blog;action-uri=http://wordpress.com/signup/;icon-uri=http://s2.wp.com/i/favicon.ico"><meta name="msapplication-task" content="name=WordPress.com Support;action-uri=http://support.wordpress.com/;icon-uri=http://s2.wp.com/i/favicon.ico"><meta name="msapplication-task" content="name=WordPress.com Forums;action-uri=http://forums.wordpress.com/;icon-uri=http://s2.wp.com/i/favicon.ico"><meta name="title" content="Posts about Deep Copy on 2,000 Things You Should Know About C#">
<meta name="description" content="Posts about Deep Copy written by Sean">
		<style type="text/css">
			#header h1,
			#header h1 a,
			#header h1 a:visited,
			#header h4,
			#header h4 a,
			#header h4 a:visited,
			.header-left {
				color: #333333;
			}
		</style>
<link href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/shCore.css" type="text/css" rel="stylesheet"><link href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/shThemeDefault.css" type="text/css" rel="stylesheet"><style type="text/css" id="syntaxhighlighteranchor"></style>
<link rel="stylesheet" type="text/css" id="gravatar-card-css" href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/hovercard.css"><link rel="stylesheet" type="text/css" id="gravatar-card-services-css" href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/services.css"></head>

<body class="archive tag tag-deep-copy tag-11859575 mp6 customizer-styles-applied highlander-enabled highlander-light infinite-scroll neverending">

<div id="header">
	<div class="header-left">
					<h4><a href="http://csharp.2000things.com/">2,000 Things You Should Know About C#</a></h4>
				<p id="description">Everything a C# Developer Needs to Know, in Bite-Sized Chunks</p>
	</div>
	<div class="header-right">
		<form method="get" id="searchform" action="http://csharp.2000things.com/">
			<div><label class="hidden" for="s">Search:</label>
			<input name="s" id="s" type="text">
			<input id="searchsubmit" value="Go" type="submit"></div>
		</form>
	</div>
</div>
<div id="access">
	<div id="nav">
		<div id="supernav" class="navleft nav">
			<div class="menu"><ul><li><a href="http://csharp.2000things.com/">Home</a></li><li class="page_item page-item-2"><a href="http://csharp.2000things.com/about/">About Me</a></li><li class="page_item page-item-123"><a href="http://csharp.2000things.com/index/">Index</a></li></ul></div>
		</div>
		<div class="navright">
			<a class="rsslink" rel="nofollow" href="http://csharp.2000things.com/feed/">Posts</a>
			<a class="rsslink" rel="nofollow" href="http://csharp.2000things.com/comments/feed/">Comments</a>
		</div>
	</div>

	<div id="subnav" class="subnav nav">
			<div class="menu">
		<ul>
				<li class="cat-item cat-item-8516"><a href="http://csharp.2000things.com/category/basics/">Basics</a>
</li>
	<li class="cat-item cat-item-1325"><a href="http://csharp.2000things.com/category/classes/">Classes</a>
</li>
	<li class="cat-item cat-item-680638"><a href="http://csharp.2000things.com/category/data-types/">Data Types</a>
</li>
	<li class="cat-item cat-item-22400"><a href="http://csharp.2000things.com/category/methods/">Methods</a>
</li>
	<li class="cat-item cat-item-449693"><a href="http://csharp.2000things.com/category/exceptions/">Exceptions</a>
</li>
	<li class="cat-item cat-item-6678"><a href="http://csharp.2000things.com/category/visual-studio/">Visual Studio</a>
</li>
	<li class="cat-item cat-item-176356"><a href="http://csharp.2000things.com/category/strings/">Strings</a>
</li>
	<li class="cat-item cat-item-875"><a href="http://csharp.2000things.com/category/miscellaneous/">Miscellaneous</a>
</li>
	<li class="cat-item cat-item-73644"><a href="http://csharp.2000things.com/category/operators/">Operators</a>
</li>
	<li class="cat-item cat-item-20811"><a href="http://csharp.2000things.com/category/statements/">Statements</a>
</li>
		</ul>
	</div>
	</div>
</div>

<div id="wrap">
<div id="content">

	<div id="content-left">

		
			<div class="post-7060 post type-post status-publish format-standard hentry category-classes tag-c tag-classes tag-copy-constructor tag-deep-copy">

				<div class="entry">

					<h2><a href="http://csharp.2000things.com/2013/04/22/827-making-a-deep-copy-with-a-copy-constructor/">#827 – Making a Deep Copy with a Copy&nbsp;Constructor</a></h2>

					<div class="post-info">
						<p>
							<span class="time">April 22, 2013</span>
																						<span class="post-comments"><a href="http://csharp.2000things.com/2013/04/22/827-making-a-deep-copy-with-a-copy-constructor/#comments">2 Comments</a></span>
																				</p>
					</div>

					<p>The semantics that you use within a <a href="http://wp.me/pXTis-1Pt">copy constructor</a> can be to make a <a href="http://wp.me/pXTis-1PF">shallow copy</a> of an object or a <a href="http://wp.me/pXTis-1PJ">deep copy</a>.</p>
<p>In the example below, the copy constructor for&nbsp;<strong>Dog</strong> makes a deep copy of the object passed in. &nbsp;In this case, that means that the new&nbsp;<strong>Dog</strong> that is created will also have a new instance of&nbsp;<strong>DogCollar</strong> object, copied from the <strong>DogCollar</strong> property of the&nbsp;original <strong>Dog</strong>&nbsp;object.</p>
<div><div id="highlighter_378346" class="syntaxhighlighter  csharp"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div><div class="line number9 index8 alt2">9</div><div class="line number10 index9 alt1">10</div><div class="line number11 index10 alt2">11</div><div class="line number12 index11 alt1">12</div><div class="line number13 index12 alt2">13</div><div class="line number14 index13 alt1">14</div><div class="line number15 index14 alt2">15</div><div class="line number16 index15 alt1">16</div><div class="line number17 index16 alt2">17</div><div class="line number18 index17 alt1">18</div><div class="line number19 index18 alt2">19</div><div class="line number20 index19 alt1">20</div><div class="line number21 index20 alt2">21</div><div class="line number22 index21 alt1">22</div><div class="line number23 index22 alt2">23</div><div class="line number24 index23 alt1">24</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="csharp keyword">public</code> <code class="csharp keyword">class</code> <code class="csharp plain">Dog</code></div><div class="line number2 index1 alt1"><code class="csharp plain">{</code></div><div class="line number3 index2 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">string</code> <code class="csharp plain">Name { </code><code class="csharp keyword">get</code><code class="csharp plain">; </code><code class="csharp keyword">set</code><code class="csharp plain">; }</code></div><div class="line number4 index3 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">int</code> <code class="csharp plain">Age { </code><code class="csharp keyword">get</code><code class="csharp plain">; </code><code class="csharp keyword">set</code><code class="csharp plain">; }</code></div><div class="line number5 index4 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp plain">DogCollar Collar { </code><code class="csharp keyword">get</code><code class="csharp plain">; </code><code class="csharp keyword">set</code><code class="csharp plain">; }</code></div><div class="line number6 index5 alt1">&nbsp;</div><div class="line number7 index6 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp comments">// Constructor that takes individual property values</code></div><div class="line number8 index7 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp plain">Dog(</code><code class="csharp keyword">string</code> <code class="csharp plain">name, </code><code class="csharp keyword">int</code> <code class="csharp plain">age)</code></div><div class="line number9 index8 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div><div class="line number10 index9 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">Name = name;</code></div><div class="line number11 index10 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">Age = age;</code></div><div class="line number12 index11 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div><div class="line number13 index12 alt2">&nbsp;</div><div class="line number14 index13 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp comments">// Copy constructor (deep copy)</code></div><div class="line number15 index14 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp plain">Dog(Dog otherDog)</code></div><div class="line number16 index15 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div><div class="line number17 index16 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">Name = otherDog.Name;</code></div><div class="line number18 index17 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">Age = otherDog.Age;</code></div><div class="line number19 index18 alt2">&nbsp;</div><div class="line number20 index19 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">Collar = (otherDog.Collar != </code><code class="csharp keyword">null</code><code class="csharp plain">) ?</code></div><div class="line number21 index20 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">new</code> <code class="csharp plain">DogCollar(otherDog.Collar.Length, otherDog.Collar.Width) :</code></div><div class="line number22 index21 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">null</code><code class="csharp plain">;</code></div><div class="line number23 index22 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div><div class="line number24 index23 alt1"><code class="csharp plain">}</code></div></div></td></tr></tbody></table></div></div>
<div class="clear"></div>

				</div>

				<div class="post-meta">
					<p>
						<span class="categories">Filed under <a href="http://csharp.2000things.com/category/classes/" rel="category tag">Classes</a></span>
						<span class="tags">Tagged with <a href="http://csharp.2000things.com/tag/c/" rel="tag">C#</a>, <a href="http://csharp.2000things.com/tag/classes/" rel="tag">Classes</a>, <a href="http://csharp.2000things.com/tag/copy-constructor/" rel="tag">Copy Constructor</a>, <a href="http://csharp.2000things.com/tag/deep-copy/" rel="tag">Deep Copy</a></span>					</p>
				</div>

			</div>

		
			<div class="post-7051 post type-post status-publish format-standard hentry category-classes tag-c tag-classes tag-copy tag-deep-copy tag-object tag-shallow-copy">

				<div class="entry">

					<h2><a href="http://csharp.2000things.com/2013/04/19/826-deep-copies/">#826 – Deep&nbsp;Copies</a></h2>

					<div class="post-info">
						<p>
							<span class="time">April 19, 2013</span>
																						<span class="post-comments"><a href="http://csharp.2000things.com/2013/04/19/826-deep-copies/#comments">6 Comments</a></span>
																				</p>
					</div>

					<p>When making a copy of an object, you can either make a&nbsp;<em>shallow copy</em>&nbsp;or a&nbsp;<em>deep copy</em>. &nbsp;As opposed to a&nbsp;<a href="http://wp.me/pXTis-1PF"><em>shallow copy</em></a>, a&nbsp;<em>deep copy</em> is one in which a copy is made not only of the top-level object, but of all the objects referenced by the original object.</p>
<p>During the copy process, whenever a reference to a child object is 
encountered, a new instance (or deep copy) of the child object is made.</p>
<p>For example, if a&nbsp;<strong>Dog</strong>&nbsp;object contains a reference to a&nbsp;<strong>DogCollar</strong>&nbsp;object and we make a deep copy, we get the following:</p>
<p><a href="http://2000thingscsharp.files.wordpress.com/2013/04/826-001.png"><img scale="1.5" originalw="630" class="alignnone size-full wp-image-7055" alt="826-001" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/826-001.png" height="291" width="321"></a></p>
<p>When doing a deep copy, a deep copy is typically made of all child 
objects in the object hierarchy. &nbsp;For example, if the&nbsp;<strong>DogCollar</strong> instance had in turn referred to another object, a copy would have been made of that object.</p>
<div class="clear"></div>

				</div>

				<div class="post-meta">
					<p>
						<span class="categories">Filed under <a href="http://csharp.2000things.com/category/classes/" rel="category tag">Classes</a></span>
						<span class="tags">Tagged with <a href="http://csharp.2000things.com/tag/c/" rel="tag">C#</a>, <a href="http://csharp.2000things.com/tag/classes/" rel="tag">Classes</a>, <a href="http://csharp.2000things.com/tag/copy/" rel="tag">Copy</a>, <a href="http://csharp.2000things.com/tag/deep-copy/" rel="tag">Deep Copy</a>, <a href="http://csharp.2000things.com/tag/object/" rel="tag">Object</a>, <a href="http://csharp.2000things.com/tag/shallow-copy/" rel="tag">Shallow Copy</a></span>					</p>
				</div>

			</div>

		
			<div class="post-7047 post type-post status-publish format-standard hentry category-classes tag-c tag-classes tag-copy tag-deep-copy tag-objects tag-shallow-copy">

				<div class="entry">

					<h2><a href="http://csharp.2000things.com/2013/04/18/825-shallow-copies/">#825 – Shallow&nbsp;Copies</a></h2>

					<div class="post-info">
						<p>
							<span class="time">April 18, 2013</span>
																						<span class="post-comments"><a href="http://csharp.2000things.com/2013/04/18/825-shallow-copies/#comments">5 Comments</a></span>
																				</p>
					</div>

					<p>When making a copy of an object, you can either make a&nbsp;<em>shallow copy</em> or a&nbsp;<em>deep copy</em>.
 &nbsp;A shallow copy is one in which the exact values of all data 
members of the object are copied. &nbsp;You can think of this as 
byte-for-byte copy of the original object.</p>
<p>With a shallow copy, reference-typed members are copied by copying 
the reference to the object, rather than by making a new copy of the 
child object.</p>
<p>For example, if a&nbsp;<strong>Dog</strong> object contains a reference to a&nbsp;<strong>DogCollar</strong> object and we make a shallow copy, we get the following:</p>
<p><a href="http://2000thingscsharp.files.wordpress.com/2013/04/825-0011.png"><img scale="1.5" originalw="630" class="alignnone size-full wp-image-7053" alt="825-001" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/825-0011.png" height="276" width="320"></a></p>
<p>The problem with a shallow copy is that the second object is now 
referencing the sub-objects that the first object pointed to. &nbsp;In 
many cases, this may not be what you want. &nbsp;In the example above, 
if we change the first dog’s collar, we also change the second dog’s 
collar.</p>
<div class="clear"></div>

				</div>

				<div class="post-meta">
					<p>
						<span class="categories">Filed under <a href="http://csharp.2000things.com/category/classes/" rel="category tag">Classes</a></span>
						<span class="tags">Tagged with <a href="http://csharp.2000things.com/tag/c/" rel="tag">C#</a>, <a href="http://csharp.2000things.com/tag/classes/" rel="tag">Classes</a>, <a href="http://csharp.2000things.com/tag/copy/" rel="tag">Copy</a>, <a href="http://csharp.2000things.com/tag/deep-copy/" rel="tag">Deep Copy</a>, <a href="http://csharp.2000things.com/tag/objects/" rel="tag">Objects</a>, <a href="http://csharp.2000things.com/tag/shallow-copy/" rel="tag">Shallow Copy</a></span>					</p>
				</div>

			</div>

		
			<div class="post-2315 post type-post status-publish format-standard hentry category-methods tag-c tag-clone tag-deep-copy tag-methods tag-reference-types">

				<div class="entry">

					<h2><a href="http://csharp.2000things.com/2011/03/10/266-you-cant-prevent-a-method-from-changing-the-contents-of-reference-types/">#266 – You Can’t Prevent a Method from Changing the Contents of Reference&nbsp;Types</a></h2>

					<div class="post-info">
						<p>
							<span class="time">March 10, 2011</span>
																						<span class="post-comments"><a href="http://csharp.2000things.com/2011/03/10/266-you-cant-prevent-a-method-from-changing-the-contents-of-reference-types/#respond">Leave a comment</a></span>
																				</p>
					</div>

					<p>We saw that even when you pass a variable by value to a method, if that variable is a reference to an object, the <a href="http://csharp.2000things.com/2011/03/09/265-passing-reference-types-by-value/">method can change the contents</a> of the object.</p>
<p>C# doesn’t have a built-in language construct that allows you to tell
 the compiler to prohibit a method from changing the contents of an 
object that a parameter references.&nbsp; (In C++, we can do this with 
the <strong>const</strong> keyword).</p>
<p>In C#, if you want to prevent a method from changing an object, you 
need to first clone your original object and pass a copy of the object 
to the method. (You’ll want to make a <a href="http://csharp.2000things.com/2010/11/08/144-using-serialization-to-implement-deep-copying/"><em>deep copy</em></a> of the object).</p>
<p>Here’s an example of using the <a href="http://csharp.2000things.com/2010/11/08/144-using-serialization-to-implement-deep-copying/"><strong>DeepCopy&lt;T&gt;</strong></a> method to pass a copy of the object.</p>
<div><div id="highlighter_605406" class="syntaxhighlighter  csharp"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="csharp plain">kirby.BarkAt(DeepCopy&lt;Dog&gt;(jack));</code></div></div></td></tr></tbody></table></div></div>
<p><a href="http://2000thingscsharp.files.wordpress.com/2011/03/001-beforecall.png"><img scale="1.5" originalw="630" class="alignnone size-full wp-image-2317" title="001-BeforeCall" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/001-beforecall.png" alt="" height="241" width="385"></a><br>
<a href="http://2000thingscsharp.files.wordpress.com/2011/03/002-aftercall.png"><img scale="1.5" originalw="630" class="alignnone size-full wp-image-2318" title="002-AfterCall" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/002-aftercall.png" alt="" height="225" width="370"></a></p>
<div class="clear"></div>

				</div>

				<div class="post-meta">
					<p>
						<span class="categories">Filed under <a href="http://csharp.2000things.com/category/methods/" rel="category tag">Methods</a></span>
						<span class="tags">Tagged with <a href="http://csharp.2000things.com/tag/c/" rel="tag">C#</a>, <a href="http://csharp.2000things.com/tag/clone/" rel="tag">Clone</a>, <a href="http://csharp.2000things.com/tag/deep-copy/" rel="tag">Deep Copy</a>, <a href="http://csharp.2000things.com/tag/methods/" rel="tag">Methods</a>, <a href="http://csharp.2000things.com/tag/reference-types/" rel="tag">Reference Types</a></span>					</p>
				</div>

			</div>

		
			<div class="post-1412 post type-post status-publish format-standard hentry category-classes tag-c tag-deep-copy tag-serialization">

				<div class="entry">

					<h2><a href="http://csharp.2000things.com/2010/11/08/144-using-serialization-to-implement-deep-copying/">#144 – Using Serialization to Implement Deep&nbsp;Copying</a></h2>

					<div class="post-info">
						<p>
							<span class="time">November 8, 2010</span>
																						<span class="post-comments"><a href="http://csharp.2000things.com/2010/11/08/144-using-serialization-to-implement-deep-copying/#comments">4 Comments</a></span>
																				</p>
					</div>

					<p>One alternative to using the <strong>ICloneable</strong> interface to support <a href="http://wp.me/pXTis-mw">making a deep copy</a> for a custom type is to use serialization.</p>
<p>This method will work only if the class to be copied, as well as all 
classes referenced by it (directly or indirectly), are serializable.</p>
<p>For example, if we have a <strong>Person</strong> class that has some value-typed members, but also a reference to an instance of the <strong>Address</strong> class, both the <strong>Person</strong> and <strong>Address</strong> classes have to be serializable in order to use this technique.</p>
<p>Here’s a generic method that makes a deep copy using serialization, 
serializing the object into a stream and then deserializing into a new 
object.</p>
<div><div id="highlighter_108649" class="syntaxhighlighter  csharp"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div><div class="line number9 index8 alt2">9</div><div class="line number10 index9 alt1">10</div><div class="line number11 index10 alt2">11</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="csharp keyword">public</code> <code class="csharp keyword">static</code> <code class="csharp plain">T DeepCopy&lt;T&gt;(T obj)</code></div><div class="line number2 index1 alt1"><code class="csharp plain">{</code></div><div class="line number3 index2 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">using</code> <code class="csharp plain">(MemoryStream stream = </code><code class="csharp keyword">new</code> <code class="csharp plain">MemoryStream())</code></div><div class="line number4 index3 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div><div class="line number5 index4 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">BinaryFormatter formatter = </code><code class="csharp keyword">new</code> <code class="csharp plain">BinaryFormatter();</code></div><div class="line number6 index5 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">formatter.Serialize(stream, obj);</code></div><div class="line number7 index6 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">stream.Position = 0;</code></div><div class="line number8 index7 alt1">&nbsp;</div><div class="line number9 index8 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">return</code> <code class="csharp plain">(T)formatter.Deserialize(stream);</code></div><div class="line number10 index9 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div><div class="line number11 index10 alt2"><code class="csharp plain">}</code></div></div></td></tr></tbody></table></div></div>
<p>Using this method to deep copy a <strong>Person</strong>:</p>
<div><div id="highlighter_644457" class="syntaxhighlighter  csharp"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="csharp plain">Person bronteClone = DeepCopy&lt;Person&gt;(emily);</code></div></div></td></tr></tbody></table></div></div>
<div class="clear"></div>

				</div>

				<div class="post-meta">
					<p>
						<span class="categories">Filed under <a href="http://csharp.2000things.com/category/classes/" rel="category tag">Classes</a></span>
						<span class="tags">Tagged with <a href="http://csharp.2000things.com/tag/c/" rel="tag">C#</a>, <a href="http://csharp.2000things.com/tag/deep-copy/" rel="tag">Deep Copy</a>, <a href="http://csharp.2000things.com/tag/serialization/" rel="tag">Serialization</a></span>					</p>
				</div>

			</div>

		
			<div class="post-1396 post type-post status-publish format-standard hentry category-classes tag-c tag-clone tag-deep-copy tag-icloneable">

				<div class="entry">

					<h2><a href="http://csharp.2000things.com/2010/11/07/143-an-example-of-implementing-icloneable-for-deep-copies/">#143 – An Example of Implementing ICloneable for Deep&nbsp;Copies</a></h2>

					<div class="post-info">
						<p>
							<span class="time">November 7, 2010</span>
																						<span class="post-comments"><a href="http://csharp.2000things.com/2010/11/07/143-an-example-of-implementing-icloneable-for-deep-copies/#comments">5 Comments</a></span>
																				</p>
					</div>

					<p>Here’s an example of implementing <strong>ICloneable</strong> in two custom classes so that you can use the <strong>Clone</strong> method to do a deep copy.</p>
<p>To do a deep copy of the <strong>Person</strong> class, we need to copy its members that are value types and then create a new instance of <strong>Address</strong> by calling its <strong>Clone</strong> method.</p>
<div><div id="highlighter_680679" class="syntaxhighlighter  csharp"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div><div class="line number9 index8 alt2">9</div><div class="line number10 index9 alt1">10</div><div class="line number11 index10 alt2">11</div><div class="line number12 index11 alt1">12</div><div class="line number13 index12 alt2">13</div><div class="line number14 index13 alt1">14</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="csharp keyword">public</code> <code class="csharp keyword">class</code> <code class="csharp plain">Person : ICloneable</code></div><div class="line number2 index1 alt1"><code class="csharp plain">{</code></div><div class="line number3 index2 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">string</code> <code class="csharp plain">LastName { </code><code class="csharp keyword">get</code><code class="csharp plain">; </code><code class="csharp keyword">set</code><code class="csharp plain">; }</code></div><div class="line number4 index3 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">string</code> <code class="csharp plain">FirstName { </code><code class="csharp keyword">get</code><code class="csharp plain">; </code><code class="csharp keyword">set</code><code class="csharp plain">; }</code></div><div class="line number5 index4 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp plain">Address PersonAddress { </code><code class="csharp keyword">get</code><code class="csharp plain">; </code><code class="csharp keyword">set</code><code class="csharp plain">; }</code></div><div class="line number6 index5 alt1">&nbsp;</div><div class="line number7 index6 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">object</code> <code class="csharp plain">Clone()</code></div><div class="line number8 index7 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div><div class="line number9 index8 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">Person newPerson = (Person)</code><code class="csharp keyword">this</code><code class="csharp plain">.MemberwiseClone();</code></div><div class="line number10 index9 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">newPerson.PersonAddress = (Address)</code><code class="csharp keyword">this</code><code class="csharp plain">.PersonAddress.Clone();</code></div><div class="line number11 index10 alt2">&nbsp;</div><div class="line number12 index11 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">return</code> <code class="csharp plain">newPerson;</code></div><div class="line number13 index12 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div><div class="line number14 index13 alt1"><code class="csharp plain">}</code></div></div></td></tr></tbody></table></div></div>
<p>The <strong>Address</strong> class uses <strong>MemberwiseClone</strong> to make a copy of itself.</p>
<div><div id="highlighter_84045" class="syntaxhighlighter  csharp"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div><div class="line number2 index1 alt1">2</div><div class="line number3 index2 alt2">3</div><div class="line number4 index3 alt1">4</div><div class="line number5 index4 alt2">5</div><div class="line number6 index5 alt1">6</div><div class="line number7 index6 alt2">7</div><div class="line number8 index7 alt1">8</div><div class="line number9 index8 alt2">9</div><div class="line number10 index9 alt1">10</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="csharp keyword">public</code> <code class="csharp keyword">class</code> <code class="csharp plain">Address : ICloneable</code></div><div class="line number2 index1 alt1"><code class="csharp plain">{</code></div><div class="line number3 index2 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">int</code> <code class="csharp plain">HouseNumber { </code><code class="csharp keyword">get</code><code class="csharp plain">; </code><code class="csharp keyword">set</code><code class="csharp plain">; }</code></div><div class="line number4 index3 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">string</code> <code class="csharp plain">StreetName { </code><code class="csharp keyword">get</code><code class="csharp plain">; </code><code class="csharp keyword">set</code><code class="csharp plain">; }</code></div><div class="line number5 index4 alt2">&nbsp;</div><div class="line number6 index5 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">public</code> <code class="csharp keyword">object</code> <code class="csharp plain">Clone()</code></div><div class="line number7 index6 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">{</code></div><div class="line number8 index7 alt1"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp keyword">return</code> <code class="csharp keyword">this</code><code class="csharp plain">.MemberwiseClone();</code></div><div class="line number9 index8 alt2"><code class="csharp spaces">&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="csharp plain">}</code></div><div class="line number10 index9 alt1"><code class="csharp plain">}</code></div></div></td></tr></tbody></table></div></div>
<p>Cloning a <strong>Person</strong>:</p>
<div><div id="highlighter_361599" class="syntaxhighlighter  csharp"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter"><div class="line number1 index0 alt2">1</div></td><td class="code"><div class="container"><div class="line number1 index0 alt2"><code class="csharp plain">Person herClone = (Person)emilyBronte.Clone();</code></div></div></td></tr></tbody></table></div></div>
<div class="clear"></div>

				</div>

				<div class="post-meta">
					<p>
						<span class="categories">Filed under <a href="http://csharp.2000things.com/category/classes/" rel="category tag">Classes</a></span>
						<span class="tags">Tagged with <a href="http://csharp.2000things.com/tag/c/" rel="tag">C#</a>, <a href="http://csharp.2000things.com/tag/clone/" rel="tag">Clone</a>, <a href="http://csharp.2000things.com/tag/deep-copy/" rel="tag">Deep Copy</a>, <a href="http://csharp.2000things.com/tag/icloneable/" rel="tag">ICloneable</a></span>					</p>
				</div>

			</div>

		
			<div class="post-1391 post type-post status-publish format-standard hentry category-data-types tag-deep-copy tag-icloneable">

				<div class="entry">

					<h2><a href="http://csharp.2000things.com/2010/11/06/142-implement-icloneable-all-the-way-down-for-deep-copies/">#142 – Implement ICloneable All the Way Down for Deep&nbsp;Copies</a></h2>

					<div class="post-info">
						<p>
							<span class="time">November 6, 2010</span>
																						<span class="post-comments"><a href="http://csharp.2000things.com/2010/11/06/142-implement-icloneable-all-the-way-down-for-deep-copies/#respond">Leave a comment</a></span>
																				</p>
					</div>

					<p>If you want to use the <strong>ICloneable.Clone</strong> method of a class to make a deep copy, you class must be implemented so that <strong>Clone</strong> provides a deep copy.&nbsp; It’s up to the author of a class whether the <strong>Clone</strong> method makes a shallow or a deep copy.</p>
<p>If you want <strong>Clone </strong>to support deep copies and you are authoring the class, you can do one of two things:</p>
<ul>
<li>If your class’ members are all value types, just <a href="http://wp.me/pXTis-mk">use <strong>MemberwiseClone</strong></a></li>
<li>Clone your object and then make a deep copy of any objects that it references</li>
</ul>
<p>You can use <strong>Clone</strong> as a deep copy mechanism all the 
way down the object tree only if you are the author of each class and 
can implement deep copy semantics, or if you know that the objects your 
object references have a mechanism for making deep copies.</p>
<div class="clear"></div>

				</div>

				<div class="post-meta">
					<p>
						<span class="categories">Filed under <a href="http://csharp.2000things.com/category/data-types/" rel="category tag">Data Types</a></span>
						<span class="tags">Tagged with <a href="http://csharp.2000things.com/tag/deep-copy/" rel="tag">Deep Copy</a>, <a href="http://csharp.2000things.com/tag/icloneable/" rel="tag">ICloneable</a></span>					</p>
				</div>

			</div>

		
		<div class="navlink">
			<div class="nav-previous"><p><a href="http://csharp.2000things.com/tag/deep-copy/page/2/"><span class="meta-nav">←</span> Older posts</a></p></div>
			<div class="nav-next"><p></p></div>
		</div>

	<span style="display: none;" class="infinite-loader"><div role="progressbar" style="position: relative; width: 0px; z-index: 2000000000; left: 17px; top: 0px;" class="spinner"><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-0-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(0deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-1-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(45deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-2-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(90deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-3-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(135deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-4-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(180deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-5-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(225deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-6-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(270deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-7-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(315deg) translate(5px, 0px); border-radius: 1px;"></div></div></div></span><span style="display: none;" class="infinite-loader"><div role="progressbar" style="position: relative; width: 0px; z-index: 2000000000; left: 17px; top: 0px;" class="spinner"><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-0-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(0deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-1-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(45deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-2-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(90deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-3-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(135deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-4-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(180deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-5-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(225deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-6-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(270deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-7-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(315deg) translate(5px, 0px); border-radius: 1px;"></div></div></div></span><span style="display: none;" class="infinite-loader"><div role="progressbar" style="position: relative; width: 0px; z-index: 2000000000; left: 17px; top: 0px;" class="spinner"><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-0-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(0deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-1-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(45deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-2-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(90deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-3-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(135deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-4-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(180deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-5-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(225deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-6-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(270deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-7-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(315deg) translate(5px, 0px); border-radius: 1px;"></div></div></div></span><span style="display: none;" class="infinite-loader"><div role="progressbar" style="position: relative; width: 0px; z-index: 2000000000; left: 17px; top: 0px;" class="spinner"><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-0-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(0deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-1-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(45deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-2-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(90deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-3-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(135deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-4-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(180deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-5-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(225deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-6-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(270deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-7-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(315deg) translate(5px, 0px); border-radius: 1px;"></div></div></div></span><span style="display: none;" class="infinite-loader"><div role="progressbar" style="position: relative; width: 0px; z-index: 2000000000; left: 17px; top: 0px;" class="spinner"><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-0-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(0deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-1-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(45deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-2-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(90deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-3-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(135deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-4-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(180deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-5-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(225deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-6-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(270deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-7-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(315deg) translate(5px, 0px); border-radius: 1px;"></div></div></div></span><span style="display: none;" class="infinite-loader"><div role="progressbar" style="position: relative; width: 0px; z-index: 2000000000; left: 17px; top: 14px;" class="spinner"><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-0-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(0deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-1-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(45deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-2-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(90deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-3-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(135deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-4-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(180deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-5-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(225deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-6-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(270deg) translate(5px, 0px); border-radius: 1px;"></div></div><div style="position: absolute; top: -1px; opacity: 0.25; animation: 0.769231s linear 0s normal none infinite opacity-60-25-7-8;"><div style="position: absolute; width: 7px; height: 3px; background: none repeat scroll 0% 0% rgb(0, 0, 0); box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1); transform-origin: left center 0px; transform: rotate(315deg) translate(5px, 0px); border-radius: 1px;"></div></div></div></span></div>

<div id="sidebar">

	<div id="gravatar-3" class="widget widget_gravatar"><h4>Sean Sexton</h4><p><img scale-fail="1.5" scale="1.5" src-orig="http://2.gravatar.com/avatar/8922e4d5254d602ba3ed32dd073b5a4e?s=64&amp;d=identicon&amp;r=G" originals="64" id="grav-8922e4d5254d602ba3ed32dd073b5a4e-0" alt="" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/8922e4d5254d602ba3ed32dd073b5a4e.jpg" class="avatar avatar-64 grav-widget-none grav-hashed grav-hijack" height="64" width="64"></p>
</div>		<div id="recent-posts-4" class="widget widget_recent_entries">		<h4>Recent Posts</h4>		<ul>
					<li>
				<a href="http://csharp.2000things.com/2015/04/02/1220-c-6-0-defining-a-parameterless-constructor-for-a-struct/">#1,220 – C# 6.0 – Defining a Parameterless Constructor for a&nbsp;struct</a>
						</li>
					<li>
				<a href="http://csharp.2000things.com/2014/11/05/1219-c-6-0-filtering-exceptions/">#1,219 – C# 6.0 – Filtering&nbsp;Exceptions</a>
						</li>
					<li>
				<a href="http://csharp.2000things.com/2014/11/04/1218-c-6-0-using-lambdas-for-getter-only-auto-properties/">#1,218 – C# 6.0 – Using Lambdas for Getter-Only&nbsp;Auto-Properties</a>
						</li>
					<li>
				<a href="http://csharp.2000things.com/2014/11/03/1217-using-lambda-expressions-for-function-members/">#1,217 – C# 6.0 – Using Lambda Expressions for Function&nbsp;Members</a>
						</li>
					<li>
				<a href="http://csharp.2000things.com/2014/10/31/1216-c-6-0-initializing-read-only-auto-properties-within-constructors/">#1,216 – C# 6.0 – Initializing Read-Only Auto-Properties from&nbsp;Constructors</a>
						</li>
				</ul>
		</div><div id="linkcat-1356" class="widget widget_links"><h4>Blogroll</h4>
	<ul class="xoxo blogroll">
<li><a href="http://wpf.2000things.com/" title="Everything a WPF Programmer Needs to Know, in Bite-Sized Chunks">2,000 Things You Should Know About WPF</a></li>
<li><a href="http://www.britannicageek.com/" title="Reading Britannica 2010, One Article at a Time" target="_blank">Britannica Geek</a></li>
<li><a href="http://twitter.com/#%21/spsexton" target="_blank">Sean on Twitter</a></li>
<li><a href="http://stuff.seans.com/" title="Learning new software development technologies out loud">Sean's Stuff</a></li>

	</ul>
</div>
<div id="calendar-3" class="widget widget_calendar"><h4>Calendar</h4><div id="calendar_wrap"><table id="wp-calendar">
	<caption>August 2015</caption>
	<thead>
	<tr>
		<th scope="col" title="Sunday">S</th>
		<th scope="col" title="Monday">M</th>
		<th scope="col" title="Tuesday">T</th>
		<th scope="col" title="Wednesday">W</th>
		<th scope="col" title="Thursday">T</th>
		<th scope="col" title="Friday">F</th>
		<th scope="col" title="Saturday">S</th>
	</tr>
	</thead>

	<tfoot>
	<tr>
		<td colspan="3" id="prev"><a href="http://csharp.2000things.com/2015/04/">« Apr</a></td>
		<td class="pad">&nbsp;</td>
		<td colspan="3" id="next" class="pad">&nbsp;</td>
	</tr>
	</tfoot>

	<tbody>
	<tr>
		<td colspan="6" class="pad">&nbsp;</td><td>1</td>
	</tr>
	<tr>
		<td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td>
	</tr>
	<tr>
		<td>9</td><td>10</td><td>11</td><td>12</td><td>13</td><td>14</td><td>15</td>
	</tr>
	<tr>
		<td>16</td><td>17</td><td>18</td><td>19</td><td>20</td><td>21</td><td>22</td>
	</tr>
	<tr>
		<td>23</td><td id="today">24</td><td>25</td><td>26</td><td>27</td><td>28</td><td>29</td>
	</tr>
	<tr>
		<td>30</td><td>31</td>
		<td class="pad" colspan="5">&nbsp;</td>
	</tr>
	</tbody>
	</table></div></div><div id="top-posts-2" class="widget widget_top-posts"><h4>Top Posts</h4><ul><li><a href="http://csharp.2000things.com/index/" class="bump-view" data-bump-view="tp">Index</a></li>
<li><a href="http://csharp.2000things.com/2010/11/07/143-an-example-of-implementing-icloneable-for-deep-copies/" class="bump-view" data-bump-view="tp">#143 - An Example of Implementing ICloneable for Deep Copies</a></li>
<li><a href="http://csharp.2000things.com/2011/08/18/392-reversing-a-string-using-the-reverse-method/" class="bump-view" data-bump-view="tp">#392 - Reversing a String Using the Reverse Method</a></li>
<li><a href="http://csharp.2000things.com/2013/11/25/981-full-list-of-c-keywords/" class="bump-view" data-bump-view="tp">#981 - Full List of C# Keywords</a></li>
<li><a href="http://csharp.2000things.com/2014/11/05/1219-c-6-0-filtering-exceptions/" class="bump-view" data-bump-view="tp">#1,219 - C# 6.0 - Filtering Exceptions</a></li>
<li><a href="http://csharp.2000things.com/2013/01/30/769-pattern-call-a-base-class-method-when-you-override-it/" class="bump-view" data-bump-view="tp">#769 - Pattern - Call a Base Class Method When You Override It</a></li>
<li><a href="http://csharp.2000things.com/2010/06/18/what-the-main-signature-looks-like/" class="bump-view" data-bump-view="tp">#1 - What the Main() Signature Looks Like</a></li>
<li><a href="http://csharp.2000things.com/2014/10/31/1216-c-6-0-initializing-read-only-auto-properties-within-constructors/" class="bump-view" data-bump-view="tp">#1,216 - C# 6.0 - Initializing Read-Only Auto-Properties from Constructors</a></li>
<li><a href="http://csharp.2000things.com/2010/06/19/the-smallest-possible-c-program/" class="bump-view" data-bump-view="tp">#2 - The Smallest Possible C# Program</a></li>
<li><a href="http://csharp.2000things.com/2013/04/18/825-shallow-copies/" class="bump-view" data-bump-view="tp">#825 - Shallow Copies</a></li>
</ul></div><div id="wp_tag_cloud-2" class="widget wp_widget_tag_cloud"><h4>Tags</h4><div style="overflow:hidden"><a href="http://csharp.2000things.com/tag/define/" class="tag-link-30689" title="8 topics" style="font-size: 8pt;">#define</a>
<a href="http://csharp.2000things.com/tag/if/" class="tag-link-54874" title="14 topics" style="font-size: 9.5117370892019pt;">#if</a>
<a href="http://csharp.2000things.com/tag/6-0/" class="tag-link-119117" title="15 topics" style="font-size: 9.6431924882629pt;">6.0</a>
<a href="http://csharp.2000things.com/tag/accessibility/" class="tag-link-3471" title="26 topics" style="font-size: 11.154929577465pt;">Accessibility</a>
<a href="http://csharp.2000things.com/tag/anonymous-types/" class="tag-link-2157766" title="9 topics" style="font-size: 8.3286384976526pt;">Anonymous Types</a>
<a href="http://csharp.2000things.com/tag/arguments/" class="tag-link-12589" title="9 topics" style="font-size: 8.3286384976526pt;">Arguments</a>
<a href="http://csharp.2000things.com/tag/array/" class="tag-link-271798" title="13 topics" style="font-size: 9.3145539906103pt;">Array</a>
<a href="http://csharp.2000things.com/tag/arrays/" class="tag-link-584090" title="35 topics" style="font-size: 12.009389671362pt;">Arrays</a>
<a href="http://csharp.2000things.com/tag/basics/" class="tag-link-8516" title="204 topics" style="font-size: 16.93896713615pt;">Basics</a>
<a href="http://csharp.2000things.com/tag/boxing/" class="tag-link-7716" title="8 topics" style="font-size: 8pt;">Boxing</a>
<a href="http://csharp.2000things.com/tag/c/" class="tag-link-2426" title="1,201 topics" style="font-size: 22pt;">C#</a>
<a href="http://csharp.2000things.com/tag/catch/" class="tag-link-82413" title="18 topics" style="font-size: 10.169014084507pt;">catch</a>
<a href="http://csharp.2000things.com/tag/class/" class="tag-link-6376" title="16 topics" style="font-size: 9.8403755868545pt;">Class</a>
<a href="http://csharp.2000things.com/tag/class-diagram/" class="tag-link-4461502" title="9 topics" style="font-size: 8.3286384976526pt;">Class Diagram</a>
<a href="http://csharp.2000things.com/tag/classes/" class="tag-link-1325" title="212 topics" style="font-size: 17.070422535211pt;">Classes</a>
<a href="http://csharp.2000things.com/tag/collections/" class="tag-link-12763" title="13 topics" style="font-size: 9.3145539906103pt;">Collections</a>
<a href="http://csharp.2000things.com/tag/constants/" class="tag-link-250093" title="12 topics" style="font-size: 9.0516431924883pt;">Constants</a>
<a href="http://csharp.2000things.com/tag/constructor/" class="tag-link-12182" title="25 topics" style="font-size: 11.023474178404pt;">Constructor</a>
<a href="http://csharp.2000things.com/tag/constructors/" class="tag-link-47331" title="14 topics" style="font-size: 9.5117370892019pt;">Constructors</a>
<a href="http://csharp.2000things.com/tag/conversions/" class="tag-link-55970" title="11 topics" style="font-size: 8.8544600938967pt;">Conversions</a>
<a href="http://csharp.2000things.com/tag/covariance/" class="tag-link-5337649" title="12 topics" style="font-size: 9.0516431924883pt;">Covariance</a>
<a href="http://csharp.2000things.com/tag/data-types/" class="tag-link-680638" title="111 topics" style="font-size: 15.230046948357pt;">Data Types</a>
<a href="http://csharp.2000things.com/tag/deep-copy/" class="tag-link-11859575" title="9 topics" style="font-size: 8.3286384976526pt;">Deep Copy</a>
<a href="http://csharp.2000things.com/tag/delegate/" class="tag-link-445004" title="15 topics" style="font-size: 9.6431924882629pt;">Delegate</a>
<a href="http://csharp.2000things.com/tag/delegates/" class="tag-link-117466" title="30 topics" style="font-size: 11.549295774648pt;">Delegates</a>
<a href="http://csharp.2000things.com/tag/enum/" class="tag-link-106916" title="22 topics" style="font-size: 10.694835680751pt;">Enum</a>
<a href="http://csharp.2000things.com/tag/enumeration/" class="tag-link-1971288" title="16 topics" style="font-size: 9.8403755868545pt;">Enumeration</a>
<a href="http://csharp.2000things.com/tag/equals/" class="tag-link-220607" title="9 topics" style="font-size: 8.3286384976526pt;">Equals</a>
<a href="http://csharp.2000things.com/tag/events/" class="tag-link-924" title="25 topics" style="font-size: 11.023474178404pt;">Events</a>
<a href="http://csharp.2000things.com/tag/exceptions/" class="tag-link-449693" title="77 topics" style="font-size: 14.178403755869pt;">Exceptions</a>
<a href="http://csharp.2000things.com/tag/fields/" class="tag-link-47332" title="12 topics" style="font-size: 9.0516431924883pt;">Fields</a>
<a href="http://csharp.2000things.com/tag/finalizer/" class="tag-link-21651143" title="10 topics" style="font-size: 8.5915492957746pt;">Finalizer</a>
<a href="http://csharp.2000things.com/tag/floating-point/" class="tag-link-1909999" title="17 topics" style="font-size: 10.037558685446pt;">Floating Point</a>
<a href="http://csharp.2000things.com/tag/foreach/" class="tag-link-2225676" title="15 topics" style="font-size: 9.6431924882629pt;">foreach</a>
<a href="http://csharp.2000things.com/tag/garbage-collection/" class="tag-link-679865" title="17 topics" style="font-size: 10.037558685446pt;">Garbage Collection</a>
<a href="http://csharp.2000things.com/tag/generic/" class="tag-link-99" title="9 topics" style="font-size: 8.3286384976526pt;">Generic</a>
<a href="http://csharp.2000things.com/tag/generics/" class="tag-link-18369" title="33 topics" style="font-size: 11.81220657277pt;">Generics</a>
<a href="http://csharp.2000things.com/tag/heap/" class="tag-link-290308" title="13 topics" style="font-size: 9.3145539906103pt;">Heap</a>
<a href="http://csharp.2000things.com/tag/ienumerable/" class="tag-link-5775173" title="8 topics" style="font-size: 8pt;">IEnumerable</a>
<a href="http://csharp.2000things.com/tag/inheritance/" class="tag-link-84839" title="27 topics" style="font-size: 11.286384976526pt;">Inheritance</a>
<a href="http://csharp.2000things.com/tag/intellisense/" class="tag-link-98072" title="12 topics" style="font-size: 9.0516431924883pt;">Intellisense</a>
<a href="http://csharp.2000things.com/tag/interface/" class="tag-link-6133" title="9 topics" style="font-size: 8.3286384976526pt;">Interface</a>
<a href="http://csharp.2000things.com/tag/interfaces/" class="tag-link-5037" title="33 topics" style="font-size: 11.81220657277pt;">Interfaces</a>
<a href="http://csharp.2000things.com/tag/lambda-expression/" class="tag-link-11167654" title="20 topics" style="font-size: 10.431924882629pt;">Lambda Expression</a>
<a href="http://csharp.2000things.com/tag/main/" class="tag-link-1520" title="8 topics" style="font-size: 8pt;">Main</a>
<a href="http://csharp.2000things.com/tag/memory/" class="tag-link-1471" title="28 topics" style="font-size: 11.352112676056pt;">Memory</a>
<a href="http://csharp.2000things.com/tag/methods/" class="tag-link-22400" title="100 topics" style="font-size: 14.901408450704pt;">Methods</a>
<a href="http://csharp.2000things.com/tag/miscellaneous/" class="tag-link-875" title="39 topics" style="font-size: 12.272300469484pt;">Miscellaneous</a>
<a href="http://csharp.2000things.com/tag/namespaces/" class="tag-link-102206" title="14 topics" style="font-size: 9.5117370892019pt;">Namespaces</a>
<a href="http://csharp.2000things.com/tag/new/" class="tag-link-4597" title="19 topics" style="font-size: 10.300469483568pt;">new</a>
<a href="http://csharp.2000things.com/tag/null/" class="tag-link-53983" title="8 topics" style="font-size: 8pt;">null</a>
<a href="http://csharp.2000things.com/tag/nullable/" class="tag-link-2612820" title="12 topics" style="font-size: 9.0516431924883pt;">Nullable</a>
<a href="http://csharp.2000things.com/tag/object/" class="tag-link-15792" title="12 topics" style="font-size: 9.0516431924883pt;">Object</a>
<a href="http://csharp.2000things.com/tag/object-initializer/" class="tag-link-24184983" title="9 topics" style="font-size: 8.3286384976526pt;">Object Initializer</a>
<a href="http://csharp.2000things.com/tag/operators/" class="tag-link-73644" title="43 topics" style="font-size: 12.535211267606pt;">Operators</a>
<a href="http://csharp.2000things.com/tag/optional-parameters/" class="tag-link-17996604" title="11 topics" style="font-size: 8.8544600938967pt;">Optional Parameters</a>
<a href="http://csharp.2000things.com/tag/override/" class="tag-link-2568065" title="18 topics" style="font-size: 10.169014084507pt;">override</a>
<a href="http://csharp.2000things.com/tag/parameters/" class="tag-link-162626" title="17 topics" style="font-size: 10.037558685446pt;">Parameters</a>
<a href="http://csharp.2000things.com/tag/patterns/" class="tag-link-5604" title="11 topics" style="font-size: 8.8544600938967pt;">Patterns</a>
<a href="http://csharp.2000things.com/tag/polymorphism/" class="tag-link-875803" title="20 topics" style="font-size: 10.431924882629pt;">Polymorphism</a>
<a href="http://csharp.2000things.com/tag/private/" class="tag-link-19" title="8 topics" style="font-size: 8pt;">Private</a>
<a href="http://csharp.2000things.com/tag/properties/" class="tag-link-30255" title="38 topics" style="font-size: 12.206572769953pt;">Properties</a>
<a href="http://csharp.2000things.com/tag/public/" class="tag-link-9085" title="8 topics" style="font-size: 8pt;">Public</a>
<a href="http://csharp.2000things.com/tag/reference-types/" class="tag-link-9810698" title="15 topics" style="font-size: 9.6431924882629pt;">Reference Types</a>
<a href="http://csharp.2000things.com/tag/statements/" class="tag-link-20811" title="12 topics" style="font-size: 9.0516431924883pt;">Statements</a>
<a href="http://csharp.2000things.com/tag/static/" class="tag-link-50318" title="9 topics" style="font-size: 8.3286384976526pt;">Static</a>
<a href="http://csharp.2000things.com/tag/strings/" class="tag-link-176356" title="30 topics" style="font-size: 11.549295774648pt;">Strings</a>
<a href="http://csharp.2000things.com/tag/struct/" class="tag-link-3237489" title="33 topics" style="font-size: 11.81220657277pt;">struct</a>
<a href="http://csharp.2000things.com/tag/throw/" class="tag-link-319727" title="11 topics" style="font-size: 8.8544600938967pt;">Throw</a>
<a href="http://csharp.2000things.com/tag/try/" class="tag-link-146508" title="9 topics" style="font-size: 8.3286384976526pt;">try</a>
<a href="http://csharp.2000things.com/tag/unicode/" class="tag-link-34880" title="18 topics" style="font-size: 10.169014084507pt;">Unicode</a>
<a href="http://csharp.2000things.com/tag/value-types/" class="tag-link-9640498" title="9 topics" style="font-size: 8.3286384976526pt;">Value Types</a>
<a href="http://csharp.2000things.com/tag/variables/" class="tag-link-61882" title="9 topics" style="font-size: 8.3286384976526pt;">Variables</a>
<a href="http://csharp.2000things.com/tag/virtual/" class="tag-link-79250" title="17 topics" style="font-size: 10.037558685446pt;">virtual</a>
<a href="http://csharp.2000things.com/tag/visual-studio/" class="tag-link-6678" title="54 topics" style="font-size: 13.192488262911pt;">Visual Studio</a></div></div><div id="blog-stats-2" class="widget widget_blog-stats"><h4>Blog Stats</h4>		<ul>
			<li>1,242,461 hits</li>
		</ul>
		</div>
</div>
</div>


<div id="footer">
	<div class="footerleft">
		<p><a href="https://wordpress.com/?ref=footer_website">Create a free website or blog at WordPress.com</a>.</p>
    </div>
    <div class="footerright">
	    <a href="https://wordpress.com/themes/enterprise/" title="Learn more about this theme">The Enterprise Theme</a>.    </div>
</div>

</div>

		<script type="text/javascript">
		//<![CDATA[
		var infiniteScroll = {"settings":{"id":"content-left","ajaxurl":"http:\/\/csharp.2000things.com\/?infinity=scrolling","type":"scroll","wrapper":true,"wrapper_class":"infinite-wrap","footer":true,"click_handle":"1","text":"Older posts","totop":"Scroll back to top","currentday":"06.11.10","order":"DESC","scripts":[],"styles":[],"google_analytics":false,"offset":0,"history":{"host":"csharp.2000things.com","path":"\/tag\/deep-copy\/page\/%d\/","use_trailing_slashes":true,"parameters":""},"query_args":{"tag":"deep-copy","error":"","m":"","p":0,"post_parent":"","subpost":"","subpost_id":"","attachment":"","attachment_id":0,"name":"","static":"","pagename":"","page_id":0,"second":"","minute":"","hour":"","day":0,"monthnum":0,"year":0,"w":0,"category_name":"","cat":"","tag_id":11859575,"author":"","author_name":"","feed":"","tb":"","paged":0,"comments_popup":"","meta_key":"","meta_value":"","preview":"","s":"","sentence":"","fields":"","menu_order":"","category__in":[],"category__not_in":[],"category__and":[],"post__in":[],"post__not_in":[],"tag__in":[],"tag__not_in":[],"tag__and":[],"tag_slug__in":["deep-copy"],"tag_slug__and":[],"post_parent__in":[],"post_parent__not_in":[],"author__in":[],"author__not_in":[],"posts_per_page":7,"ignore_sticky_posts":false,"suppress_filters":false,"cache_results":false,"update_post_term_cache":true,"update_post_meta_cache":true,"post_type":"","nopaging":false,"comments_per_page":"50","no_found_rows":false,"order":"DESC"},"last_post_date":"2010-11-06 06:00:16","stats":"blog=14273916&v=wpcom&tz=-5&user_id=0&subd=2000thingscsharp&x_pagetype=infinite"}};
		//]]>
		</script>
		<!-- wpcom_wp_footer -->
<script type="text/javascript" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/gprofiles.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var WPGroHo = {"my_hash":""};
/* ]]> */
</script>
<script type="text/javascript" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/wpgroho.js"></script>

	<script>
		//initialize and attach hovercards to all gravatars
		jQuery( document ).ready( function( $ ) {

			if (typeof Gravatar === "undefined"){
				return;
			}

			if ( typeof Gravatar.init !== "function" ) {
				return;
			}			

			Gravatar.profile_cb = function( hash, id ) {
				WPGroHo.syncProfileData( hash, id );
			};
			Gravatar.my_hash = WPGroHo.my_hash;
			Gravatar.init( 'body', '#wp-admin-bar-my-account' );
		});
	</script>

		<div style="display:none">
	<div class="grofile-hash-map-8922e4d5254d602ba3ed32dd073b5a4e">
	</div>
	</div>
		<div style="bottom: 0px;" id="infinite-footer">
			<div class="container">
				<div class="blog-info">
					<a title="Scroll back to top" id="infinity-blog-title" href="http://csharp.2000things.com/" rel="home">
						2,000 Things You Should Know About C#					</a>
				</div>
				<div class="blog-credits">
					<a href="https://wordpress.com/?ref=footer_website">Create a free website or blog at WordPress.com</a>. <a href="https://wordpress.com/themes/enterprise/" title="Learn more about this theme">The Enterprise Theme</a>.				</div>
			</div>
		</div><!-- #infinite-footer -->
		
	<div style="bottom: -302px;" id="bit" class="loggedout-follow-normal">
		<a class="bsub" href="javascript:void(0)"><span id="bsub-text">Follow</span></a>
		<div id="bitsubscribe">

					<h3><label for="loggedout-follow-field">Follow “2,000 Things You Should Know About C#”</label></h3>

			<form action="https://subscribe.wordpress.com" method="post" accept-charset="utf-8" id="loggedout-follow">
			<p>Get every new post delivered to your Inbox.</p>

			<p id="loggedout-follow-error" style="display: none;"></p>

						<p class="bit-follow-count">Join 540 other followers</p>
			<p><input name="email" placeholder="Enter your email address" id="loggedout-follow-field" type="email"></p>

			<input name="action" value="subscribe" type="hidden">
			<input name="blog_id" value="14273916" type="hidden">
			<input name="source" value="http://csharp.2000things.com/tag/deep-copy/" type="hidden">
			<input name="sub-type" value="loggedout-follow" type="hidden">

			<input id="_wpnonce" name="_wpnonce" value="c5a61e16ec" type="hidden"><input name="_wp_http_referer" value="/tag/deep-copy/" type="hidden">
			<p id="bsub-subscribe-button"><input value="Sign me up" type="submit"></p>
			</form>
					<div id="bsub-credit"><a href="https://wordpress.com/?ref=lof">Build a website with WordPress.com</a></div>
		</div><!-- #bitsubscribe -->
	</div><!-- #bit -->

	<div id="carousel-reblog-box">
		<form action="" name="carousel-reblog">
			<textarea id="carousel-reblog-content" name="carousel-reblog-content" onclick="if ( this.value == 'Add your thoughts here... (optional)' ) { this.value = ''; }" onblur="if ( this.value == '' || this.value == '' ) { this.value = 'Add your thoughts here... (optional)'; }">Add your thoughts here... (optional)</textarea>
			<label for="carousel-reblog-to-blog-id" id="carousel-reblog-lblogid">Post to</label>
			<select name="carousel-reblog-to-blog-id" id="carousel-reblog-to-blog-id">
						</select>

			<div class="submit">
				<span class="canceltext"><a href="" class="cancel">Cancel</a></span>
				<input name="carousel-reblog-submit" class="button" id="carousel-reblog-submit" value="Reblog Post" type="submit">
				<input id="carousel-reblog-blog-id" value="14273916" type="hidden">
				<input id="carousel-reblog-blog-url" value="http://csharp.2000things.com" type="hidden">
				<input id="carousel-reblog-blog-title" value="2,000 Things You Should Know About C#" type="hidden">
				<input id="carousel-reblog-post-url" value="" type="hidden">
				<input id="carousel-reblog-post-title" value="" type="hidden">
			</div>

			<input id="_wpnonce" name="_wpnonce" value="2a79c1c1c2" type="hidden"><input name="_wp_http_referer" value="/tag/deep-copy/" type="hidden">		</form>

		<div class="arrow"></div>
	</div>
<script type="text/javascript" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/a_002.js"></script>
<script type="text/javascript">
	(function(){
		var corecss = document.createElement('link');
		var themecss = document.createElement('link');
		var corecssurl = "http://s0.wp.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?m=1422342134g&amp;ver=3.0.9b";
		if ( corecss.setAttribute ) {
				corecss.setAttribute( "rel", "stylesheet" );
				corecss.setAttribute( "type", "text/css" );
				corecss.setAttribute( "href", corecssurl );
		} else {
				corecss.rel = "stylesheet";
				corecss.href = corecssurl;
		}
		document.getElementsByTagName("head")[0].insertBefore( corecss, document.getElementById("syntaxhighlighteranchor") );
		var themecssurl = "http://s0.wp.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css?m=1363304414g&amp;ver=3.0.9b";
		if ( themecss.setAttribute ) {
				themecss.setAttribute( "rel", "stylesheet" );
				themecss.setAttribute( "type", "text/css" );
				themecss.setAttribute( "href", themecssurl );
		} else {
				themecss.rel = "stylesheet";
				themecss.href = themecssurl;
		}
		//document.getElementById("syntaxhighlighteranchor").appendChild(themecss);
		document.getElementsByTagName("head")[0].insertBefore( themecss, document.getElementById("syntaxhighlighteranchor") );
	})();
	SyntaxHighlighter.config.strings.expandSource = '+ expand source';
	SyntaxHighlighter.config.strings.help = '?';
	SyntaxHighlighter.config.strings.alert = 'SyntaxHighlighter\n\n';
	SyntaxHighlighter.config.strings.noBrush = 'Can\'t find brush for: ';
	SyntaxHighlighter.config.strings.brushNotHtmlScript = 'Brush wasn\'t configured for html-script option: ';
	SyntaxHighlighter.defaults['pad-line-numbers'] = false;
	SyntaxHighlighter.defaults['toolbar'] = false;
	SyntaxHighlighter.all();
</script>
<link rel="stylesheet" id="all-css-0" href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/jetpack-carousel.css" type="text/css" media="all">
<!--[if lte IE 8]>
<link rel='stylesheet' id='jetpack-carousel-ie8fix-css'  href='http://s1.wp.com/wp-content/mu-plugins/carousel/jetpack-carousel-ie8fix.css?m=1412618825g&#038;ver=20121024' type='text/css' media='all' />
<![endif]-->
<link rel="stylesheet" id="all-css-2" href="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/tiled-gallery.css" type="text/css" media="all">
<script type="text/javascript">
/* <![CDATA[ */
var JetpackEmojiSettings = {"base_url":"http:\/\/s0.wp.com\/wp-content\/mu-plugins\/emoji\/twemoji\/"};
/* ]]> */
</script>
<script type="text/javascript">
/* <![CDATA[ */
var jetpackCarouselStrings = {"widths":[370,700,1000,1200,1400,2000],"is_logged_in":"","lang":"en","ajaxurl":"http:\/\/csharp.2000things.com\/wp-admin\/admin-ajax.php","nonce":"74feb1e107","display_exif":"1","display_geo":"1","background_color":"black","comment":"Comment","post_comment":"Post Comment","write_comment":"Write a Comment...","loading_comments":"Loading Comments...","download_original":"View full size <span class=\"photo-size\">{0}<span class=\"photo-size-times\">\u00d7<\/span>{1}<\/span>","no_comment_text":"Please be sure to submit some text with your comment.","no_comment_email":"Please provide an email address to comment.","no_comment_author":"Please provide your name to comment.","comment_post_error":"Sorry, but there was an error posting your comment. Please try again later.","comment_approved":"Your comment was approved.","comment_unapproved":"Your comment is in moderation.","camera":"Camera","aperture":"Aperture","shutter_speed":"Shutter Speed","focal_length":"Focal Length","comment_registration":"0","require_name_email":"1","login_url":"https:\/\/2000thingscsharp.wordpress.com\/wp-login.php?redirect_to=http%3A%2F%2Fcsharp.2000things.com%2F2010%2F11%2F06%2F142-implement-icloneable-all-the-way-down-for-deep-copies%2F","local_comments_commenting_as":"<fieldset><label for=\"email\">Email (Required)<\/label> <input type=\"text\" name=\"email\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-email-field\" \/><\/fieldset><fieldset><label for=\"author\">Name (Required)<\/label> <input type=\"text\" name=\"author\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-author-field\" \/><\/fieldset><fieldset><label for=\"url\">Website<\/label> <input type=\"text\" name=\"url\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-url-field\" \/><\/fieldset>","reblog":"Reblog","reblogged":"Reblogged","reblog_add_thoughts":"Add your thoughts here... (optional)","reblogging":"Reblogging...","post_reblog":"Post Reblog","stats_query_args":"blog=14273916&v=wpcom&tz=-5&user_id=0&subd=2000thingscsharp","is_public":"1"};
var jetpackCarouselStrings = {"widths":[370,700,1000,1200,1400,2000],"is_logged_in":"","lang":"en","ajaxurl":"http:\/\/csharp.2000things.com\/wp-admin\/admin-ajax.php","nonce":"74feb1e107","display_exif":"1","display_geo":"1","background_color":"black","comment":"Comment","post_comment":"Post Comment","write_comment":"Write a Comment...","loading_comments":"Loading Comments...","download_original":"View full size <span class=\"photo-size\">{0}<span class=\"photo-size-times\">\u00d7<\/span>{1}<\/span>","no_comment_text":"Please be sure to submit some text with your comment.","no_comment_email":"Please provide an email address to comment.","no_comment_author":"Please provide your name to comment.","comment_post_error":"Sorry, but there was an error posting your comment. Please try again later.","comment_approved":"Your comment was approved.","comment_unapproved":"Your comment is in moderation.","camera":"Camera","aperture":"Aperture","shutter_speed":"Shutter Speed","focal_length":"Focal Length","comment_registration":"0","require_name_email":"1","login_url":"https:\/\/2000thingscsharp.wordpress.com\/wp-login.php?redirect_to=http%3A%2F%2Fcsharp.2000things.com%2F2010%2F11%2F06%2F142-implement-icloneable-all-the-way-down-for-deep-copies%2F","local_comments_commenting_as":"<fieldset><label for=\"email\">Email (Required)<\/label> <input type=\"text\" name=\"email\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-email-field\" \/><\/fieldset><fieldset><label for=\"author\">Name (Required)<\/label> <input type=\"text\" name=\"author\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-author-field\" \/><\/fieldset><fieldset><label for=\"url\">Website<\/label> <input type=\"text\" name=\"url\" class=\"jp-carousel-comment-form-field jp-carousel-comment-form-text-field\" id=\"jp-carousel-comment-form-url-field\" \/><\/fieldset>","reblog":"Reblog","reblogged":"Reblogged","reblog_add_thoughts":"Add your thoughts here... (optional)","reblogging":"Reblogging...","post_reblog":"Post Reblog","stats_query_args":"blog=14273916&v=wpcom&tz=-5&user_id=0&subd=2000thingscsharp","is_public":"1"};
/* ]]> */
</script>
<script type="text/javascript" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/a_004.js"></script>
<script type="text/javascript" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/widgets.js"></script>
<script type="text/javascript" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/a.js"></script>
<script type="text/javascript">
// <![CDATA[
(function() {
try{
  if ( window.external &&'msIsSiteMode' in window.external) {
    if (window.external.msIsSiteMode()) {
      var jl = document.createElement('script');
      jl.type='text/javascript';
      jl.async=true;
      jl.src='/wp-content/plugins/ie-sitemode/custom-jumplist.php';
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(jl, s);
    }
  }
}catch(e){}
})();
// ]]>
</script><script type="text/javascript">
			jQuery.extend( infiniteScroll.settings.scripts, ["jquery","jquery-core","jquery-migrate","mobile-useragent-info","postmessage","jquery_inview","jetpack_resize","loggedout-subscribe","spin","jquery.spin","widget-bump-view","grofiles-cards","wpgroho","syntaxhighlighter-core","syntaxhighlighter-brush-csharp","devicepx","the-neverending-homepage","twemoji","jetpack-emoji","jetpack-emoji-init","swfobject","videopress","jetpack-carousel","twitter-widgets","twitter-widgets-infinity","twitter-widgets-pending","tiled-gallery"] );
			jQuery.extend( infiniteScroll.settings.styles, ["smileyproject","jetpack_likes","loggedout-subscribe","the-neverending-homepage","wpcom-core-compat-playlist-styles","mp6hacks","wpcom-bbpress2-staff-css","enterprise","jetpack-emoji-css","noticons","geo-location-flair","reblogging","a8c-global-print","h4-global","widget-grid-and-list","jetpack-carousel","tiled-gallery","jetpack-carousel-ie8fix"] );
		</script><script src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/w.js" type="text/javascript" async="" defer="defer"></script>
<script type="text/javascript">
_tkq = window._tkq || [];
_stq = window._stq || [];
_tkq.push(['storeContext', {'blog_id':'14273916','blog_tz':'-5','user_lang':'en','blog_lang':'en','user_id':'0'}]);
_stq.push(['view', {'blog':'14273916','v':'wpcom','tz':'-5','user_id':'0','subd':'2000thingscsharp'}]);
_stq.push(['extra', {'crypt':'UE40eW5QN0p8M2Y/RE1LVmwrVi5vQS5fVFtfdHBbPyw1VXIrU3hWLHhzVndTdktBX0ddJnpXRjVaOTd6fj1YMX4ydzRUSk0wbVRfODlnNUZzfkVXUDVidGY9T095W0ddbVlMWms0LnN8eDdxQlFsakNVcGlmczQtMSZbTlRYSlZKSCtwR3RKUTh+UV03bVYrUUxlVzEtSDJHb3E/Z1pmMGc1SWc2PWolUC5FRV01ZWg9c01Pek14SVFiT19QeDdGRUY4eUtkekZzQjJTTHByTyx8OEdbOCtJNUR5cmU4K0VEeHxoWCZhUXNsQXRfOU9zdjhvMl8lOC1nPVpEZC53fE1uLWdGeDM3azhTfmM5TnxQbmF6T0Z8XzlaJUJ1VkRZbj0zZUxLWGhlNzIvREtOY1JPT1lqYT1mU0wufA=='}]);
_stq.push([ 'clickTrackerInit', '14273916', '0' ]);
	</script>
<noscript><img src="http://pixel.wp.com/b.gif?v=noscript" style="height:0px;width:0px;overflow:hidden" alt="" /></noscript>
<script>
if ( 'object' === typeof wpcom_mobile_user_agent_info ) {

	wpcom_mobile_user_agent_info.init();
	var mobileStatsQueryString = "";
	
	if( false !== wpcom_mobile_user_agent_info.matchedPlatformName )
		mobileStatsQueryString += "&x_" + 'mobile_platforms' + '=' + wpcom_mobile_user_agent_info.matchedPlatformName;
	
	if( false !== wpcom_mobile_user_agent_info.matchedUserAgentName )
		mobileStatsQueryString += "&x_" + 'mobile_devices' + '=' + wpcom_mobile_user_agent_info.matchedUserAgentName;
	
	if( wpcom_mobile_user_agent_info.isIPad() )
		mobileStatsQueryString += "&x_" + 'ipad_views' + '=' + 'views';

	if( "" != mobileStatsQueryString ) {
		new Image().src = document.location.protocol + '//pixel.wp.com/g.gif?v=wpcom-no-pv' + mobileStatsQueryString + '&baba=' + Math.random();
	}
	
}
</script>



<img scale="0" id="wpstats" src="Deep%20Copy%20_%202,000%20Things%20You%20Should%20Know%20About%20C%23_files/g.gif"></body></html>
<!--
	generated in 0.212 seconds
	60922 bytes batcached for 300 seconds
-->